package zhu.yu.api.static0;
/*
如果一个成员变量使用了static关键字，那么这个变量不再属于对象自己，而是属于所在的类。多个对象共享同一份数据
 */
public class StaticField {
    public static void main(String[] args) {
        StaticFieldStudent one = new StaticFieldStudent("小明", 19);
        one.room = "101";
        StaticFieldStudent two = new StaticFieldStudent("小红", 29);

        System.out.println(one.getAge());
        System.out.println(one.getName());
        System.out.println(one.room);
        System.out.println(one.getId());

        System.out.println(two.getAge());
        System.out.println(two.getName());
        System.out.println(two.room);
        System.out.println(two.getId());
    }
}
